<html>
	<header>
		<script language="javascript" type="text/javascript" src="/js/jquery.1.8.2.min.js"></script>
		<script language="javascript" type="text/javascript" src="/js/ckeditor/ckeditor.js"></script>
		<script language="javascript" type="text/javascript" src="/js/ckeditor/adapters/jquery.js"></script>
		<script language="javascript" type="text/javascript">
		var editor;
		function edit () {
			if ( editor ) {
				editor.destroy();
				//editor = '';
				editor = null;
			} 
		//	$('#content').hide();

		var h = $(window.parent.document.getElementById('reader_content')).height() - 100 ;
		h = h + 'px';
			var config = {
					toolbar : 'Basic',
					height  :  h
			};
			//editor = CKEDITOR.replace( $('#content').get(0), config );
			editor = CKEDITOR.replace( document.body, config );
		}
		function preview () {
			if ( editor &&  editor.destroy()) {
				editor.destroy();
				//editor = '';
				editor = null;
			} 
//			$('#content').show();
		}
		</script>
	</header>
	<body style="padding:10px;"><{$content}></body>
</html>
